<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="generator" content="ApiGen 2.4.0">

	<title>Class RedMVC\Db\ClosureTable | RedMVC Framework</title>

	<script type="text/javascript" src="resources/combined.js?1841058525"></script>
	<script type="text/javascript" src="elementlist.js?356506387"></script>
	<script type="text/javascript">
		var ApiGen = ApiGen || {};
		ApiGen.options = {"elementDetailsCollapsed":true,"elementsOrder":"natural"};
	</script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3295955786">

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>

		<div id="groups">

			<h3>Namespaces</h3>
			<ul>
				<li><a href="namespace-PHP.html">PHP</a>
						</li>
				<li class="active"><a href="namespace-RedMVC.html">RedMVC</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Auth.html">Auth</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Auth.Adapter.html">Adapter</a>
						</li>
				<li><a href="namespace-RedMVC.Auth.Storage.html">Storage</a>
						</li>
							</ul></li>
				<li><a href="namespace-RedMVC.CodeGenerator.html">CodeGenerator</a>
						</li>
				<li><a href="namespace-RedMVC.Controller.html">Controller</a>
						</li>
				<li><a href="namespace-RedMVC.DataTable.html">DataTable</a>
						</li>
				<li class="active"><a href="namespace-RedMVC.Db.html">Db</a>
						</li>
				<li><a href="namespace-RedMVC.Drawing.html">Drawing</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Drawing.Color.html">Color</a>
						</li>
							</ul></li>
				<li><a href="namespace-RedMVC.Event.html">Event</a>
						</li>
				<li><a href="namespace-RedMVC.Feed.html">Feed</a>
						</li>
				<li><a href="namespace-RedMVC.Form.html">Form</a>
						<span></span>
						<ul>
				<li><a href="namespace-RedMVC.Form.Element.html">Element</a>
						</li>
				<li><a href="namespace-RedMVC.Form.Filter.html">Filter</a>
						</li>
				<li><a href="namespace-RedMVC.Form.Validator.html">Validator</a>
						</li>
							</ul></li>
				<li><a href="namespace-RedMVC.Http.html">Http</a>
						</li>
				<li><a href="namespace-RedMVC.Mail.html">Mail</a>
						</li>
				<li><a href="namespace-RedMVC.Model.html">Model</a>
						</li>
				<li><a href="namespace-RedMVC.Router.html">Router</a>
						</li>
							</ul></li>
			</ul>
		</div>

		<hr>

		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-RedMVC.Db.ADb.html">ADb</a></li>
				<li><a href="class-RedMVC.Db.C.html">C</a></li>
				<li class="active"><a href="class-RedMVC.Db.ClosureTable.html">ClosureTable</a></li>
				<li><a href="class-RedMVC.Db.MySql.html">MySql</a></li>
				<li><a href="class-RedMVC.Db.MySqli.html">MySqli</a></li>
				<li><a href="class-RedMVC.Db.Pdo.html">Pdo</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="">
		<input type="hidden" name="ie" value="UTF-8">
		<input type="text" name="q" class="text">
		<input type="submit" value="Search">
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="namespace-RedMVC.Db.html" title="Summary of RedMVC\Db"><span>Namespace</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class ClosureTable</h1>

	<div class="description">
	
<p>ClosureTable class</p>

	</div>








	<div class="info">
		
		
		<b>Namespace:</b> <a href="namespace-RedMVC.html">RedMVC</a>\<a href="namespace-RedMVC.Db.html">Db</a><br>

				<b>Category:</b>
				RedMVC<br>
				<b>Package:</b>
				Db<br>
				<b>Author:</b>
				Jan Fischer, bitWorking &lt;<a
href="mailto:info&#64;bitworking.de">info&#64;<!---->bitworking.de</a>&gt;<br>
		<b>Located at</b> <a href="source-class-RedMVC.Db.ClosureTable.html#19" title="Go to source code">Db/ClosureTable.php</a><br>
	</div>


	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="__set" id="___set">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___set">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#34" title="Go to source code">__set</a>( <span> <var>$name</var></span>, <span> <var>$value</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="__get" id="___get">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___get">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#42" title="Go to source code">__get</a>( <span> <var>$name</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setDb" id="_setDb">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setDb">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#50" title="Go to source code">setDb</a>( <span> <var>$db</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getDb" id="_getDb">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getDb">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#55" title="Go to source code">getDb</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setClosureTableName" id="_setClosureTableName">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setClosureTableName">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#59" title="Go to source code">setClosureTableName</a>( <span> <var>$closureTableName</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getClosureTableName" id="_getClosureTableName">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getClosureTableName">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#64" title="Go to source code">getClosureTableName</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setParentTableName" id="_setParentTableName">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setParentTableName">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#68" title="Go to source code">setParentTableName</a>( <span> <var>$parentTableName</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getParentTableName" id="_getParentTableName">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getParentTableName">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#73" title="Go to source code">getParentTableName</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setParentTablePrimary" id="_setParentTablePrimary">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setParentTablePrimary">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#77" title="Go to source code">setParentTablePrimary</a>( <span> <var>$parentTablePrimary</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getParentTablePrimary" id="_getParentTablePrimary">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getParentTablePrimary">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#82" title="Go to source code">getParentTablePrimary</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setParentTableOrder" id="_setParentTableOrder">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setParentTableOrder">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#86" title="Go to source code">setParentTableOrder</a>( <span> <var>$parentTableOrder</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getParentTableOrder" id="_getParentTableOrder">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getParentTableOrder">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#91" title="Go to source code">getParentTableOrder</a>( )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="setup" id="_setup">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_setup">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#95" title="Go to source code">setup</a>( <span> <var>$db</var></span>, <span> <var>$closureTableName</var></span>, <span> <var>$parentTableName</var></span>, <span> <var>$parentTablePrimary</var> = <span class="php-quote">'id'</span></span>, <span> <var>$parentTableOrder</var> = <span class="php-quote">'sort'</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="addRoot" id="_addRoot">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_addRoot">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#104" title="Go to source code">addRoot</a>( <span> <var>$labelField</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="byId" id="_byId">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_byId">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#117" title="Go to source code">byId</a>( <span> <var>$id</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="save" id="_save">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_save">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#132" title="Go to source code">save</a>( <span> <var>$id</var></span>, <span> <var>$parentId</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="update" id="_update">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_update">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#146" title="Go to source code">update</a>( <span> <var>$id</var></span>, <span> <var>$parentId</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="updateMysql" id="_updateMysql">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_updateMysql">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#187" title="Go to source code">updateMysql</a>( <span> <var>$id</var></span>, <span> <var>$parentId</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="addReference" id="_addReference">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_addReference">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#218" title="Go to source code">addReference</a>( <span> <var>$id</var></span>, <span> <var>$parentId</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="delete" id="_delete">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_delete">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#231" title="Go to source code">delete</a>( <span> <var>$id</var></span>, <span> <var>$deleteFromParent</var> = <span class="php-keyword1">false</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="deleteSubtree" id="_deleteSubtree">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_deleteSubtree">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#251" title="Go to source code">deleteSubtree</a>( <span> <var>$id</var></span>, <span> <var>$deleteFromParent</var> = <span class="php-keyword1">false</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="deleteSubtreeMysql" id="_deleteSubtreeMysql">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_deleteSubtreeMysql">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#283" title="Go to source code">deleteSubtreeMysql</a>( <span> <var>$id</var></span>, <span> <var>$deleteFromParent</var> = <span class="php-keyword1">false</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getChilds" id="_getChilds">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getChilds">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#310" title="Go to source code">getChilds</a>( <span> <var>$id</var></span>, <span> <var>$includeSelf</var> = <span class="php-keyword1">false</span></span>, <span> <var>$whereClauses</var> = <span class="php-keyword1">array</span>()</span>, <span> <var>$maxTreeDepth</var> = <span class="php-keyword1">null</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getFirstChilds" id="_getFirstChilds">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getFirstChilds">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#350" title="Go to source code">getFirstChilds</a>( <span> <var>$id</var></span>, <span> <var>$includeSelf</var> = <span class="php-keyword1">false</span></span>, <span> <var>$whereClauses</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getChildsPath" id="_getChildsPath">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getChildsPath">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#354" title="Go to source code">getChildsPath</a>( <span> <var>$id</var></span>, <span> <var>$labelField</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getParents" id="_getParents">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getParents">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#377" title="Go to source code">getParents</a>( <span> <var>$id</var></span>, <span> <var>$includeSelf</var> = <span class="php-keyword1">false</span></span>, <span> <var>$sort</var> = <code><a href="class-RedMVC.Db.C.html#SORT_DESC">RedMVC\Db\C::<b>SORT_DESC</b></a></code></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="getParent" id="_getParent">

		<td class="attributes"><code>
			
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getParent">#</a>
		<code><a href="source-class-RedMVC.Db.ClosureTable.html#401" title="Go to source code">getParent</a>( <span> <var>$id</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	</table>







	<table class="summary" id="properties">
	<caption>Properties summary</caption>
	<tr data-order="_db" id="$_db">

		<td class="attributes"><code>
			
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Db.ClosureTable.html#28" title="Go to source code"><var>$_db</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_db" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_closureTableName" id="$_closureTableName">

		<td class="attributes"><code>
			
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Db.ClosureTable.html#29" title="Go to source code"><var>$_closureTableName</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_closureTableName" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_parentTableName" id="$_parentTableName">

		<td class="attributes"><code>
			
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Db.ClosureTable.html#30" title="Go to source code"><var>$_parentTableName</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_parentTableName" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_parentTablePrimary" id="$_parentTablePrimary">

		<td class="attributes"><code>
			
			protected 
			string
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Db.ClosureTable.html#31" title="Go to source code"><var>$_parentTablePrimary</var></a>
		</td>
		<td class="value"><code><span class="php-quote">'id'</span></code></td>
		<td class="description"><div>
			<a href="#$_parentTablePrimary" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_parentTableOrder" id="$_parentTableOrder">

		<td class="attributes"><code>
			
			protected 
			string
		</code></td>

		<td class="name">
				<a href="source-class-RedMVC.Db.ClosureTable.html#32" title="Go to source code"><var>$_parentTableOrder</var></a>
		</td>
		<td class="value"><code><span class="php-quote">'sort'</span></code></td>
		<td class="description"><div>
			<a href="#$_parentTableOrder" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	</table>


</div>

	<div id="footer">
		RedMVC Framework API documentation generated by <a href="http://apigen.org">ApiGen 2.4.0</a>
	</div>
</div>
</div>
</body>
</html>
